package net.esj.basic.plugins.spring.support;

import net.esj.basic.utils.StringUtils;

public final class MessageUtils {

	/**
	 * 默认区包的前3位为该app注册名
	 * @return
	 */
	public static final String getApplcationMessageResourceKey(String packetname){
		return StringUtils.splitIndexOf(packetname, "\\.", 3);
	}
	
	public static final String getApplcationMessageResourceKey(Class<?> clazz){
		return getApplcationMessageResourceKey(clazz.getPackage().getName());
	}
}
